package cn.piaoyi.web.action;

import java.util.Map;

import cn.piaoyi.bean.Admin;
import cn.piaoyi.comm.Constant;
import cn.piaoyi.service.AdminService;
import cn.piaoyi.web.servlet.AdminSession;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.interceptor.SessionAware;

public class AdminIndex extends BaseAction implements SessionAware {
	private static final Log logger = LogFactory.getLog(AdminIndex.class);
	
	private AdminService adminService;

	public AdminService getAdminService() {
		return adminService;
	}

	public void setAdminService(AdminService adminService) {
		this.adminService = adminService;
	}

	private Map session;

	public void setSession(Map session) {
		this.session = session;
	}

	public Map getSession() {
		return session;
	}
	
	private String username;
	private String password;
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String execute() {
		try {
			return this.executeMethod(this.getAction());
		} catch (Exception e) {
			logger.error(e);
			return INPUT;
		}
	}

	public String index(){
		return "index";
	}
	
	public String left(){
		return "left";
	}
	
	public String top(){
		return "top";
	}
	
	public String main(){
		return "main";
	}
}
